<template>
    <div>
        <h3>权益增加</h3>
        <table class="table table-bordered">
            <tbody>
                <tr>
                    <td>权益名称</td>
                    <td>
                        <input type="text" v-model="queryadd.RightName">
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <input type="button" value="增加" class="btn btn-info"  @click="ok">
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import{ref,reactive,onMounted} from 'vue'
import{useRouter} from 'vue-router'
import axios from 'axios';
import moment from 'moment';
import {useUserStore} from '../../stores/user'
import router from '@/router';
const UserStore=useUserStore();

const queryadd=reactive({
  
  "RightName": "",
  
})
const ok=()=>{
    axios({
        method:'post',
        url:'/api/Member/RigthAdd',
        data:queryadd
    })
    .then(res=>{
        console.log(res);
        if(res.data>0){
            alert("添加成功");
        }
        else{
            alert("添加失败");
        }
    })
    .catch(err=>{
        console.log(err);
    })
}

</script>

<style scoped>

</style>